package lc.com.lcpicturebackend.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.mail.SimpleMailMessage;

/**
 * 功能：电子邮箱配置
 * 作者：lc
 * 日期：2025/5/21 16:45
 */
@Configuration
public class EmailConfig {

    @Value("${spring.mail.username}")
    private String username;

    @Bean
    public SimpleMailMessage templateMessage() {
        SimpleMailMessage message = new SimpleMailMessage();
        message.setFrom(username);
        message.setSubject("验证码通知");
        return message;
    }
}